﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceModel;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;

namespace AccessApiService
{
    public partial class AccessService : ServiceBase
    {
        public ServiceHost _host;
        public AccessService()
        {
            ZK.Common.Log4.LogManage.WriteInfo("当前事件   AccessService");
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            ZK.Common.Log4.LogManage.WriteInfo("当前事件   OnStart");
            _host = new ServiceHost(typeof(AccessApiService));
            _host.Open();
            ZK.Common.Log4.LogManage.WriteInfo("打开成功");

        }

        protected override void OnStop()
        {
            _host.Close();
            ZK.Common.Log4.LogManage.WriteInfo("当前事件   OnStop");
        }
    }
}
